<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<head>
<title>修改密码</title>
<script type="text/javascript">
	$(function() {
		
		
		$('#submit').bind('click', function(row) {
			var phone = $("#phone").val();
			var  re = /^1\d{10}$/;
			if (re.test($('#phone').val())) {
				$.post("${ctx}/basic/user/savePhone", {
					phone : phone
				}, function(data) {
					alert(data.msg);
				}, "json");
			}else{
				alert("输入正确的手机号！");
			}
		});

		$('#reset').bind('click', function(row) {
			$("#phone").val("");
		});


	});
</script>
</head>

<body>
	<div align="center">
		<div class="panel panel-primary"
			style="width: 500px; height: 350px; padding: 50px;" align="center">
			<div class="panel-heading" align="center">手机号修改</div>

			<div class="panel-body" align="center" style="padding: 30px;">
				<form>
					<table class="table-condensed">
						<tr>
							<td><label>手&nbsp;&nbsp;机&nbsp;&nbsp;号&nbsp;&nbsp;&nbsp; ：</label></td>
							<td><input id="phone" name="phone"
								 class="easyui-validatebox" required="required" value="${phone }">
							</td>
						</tr>
						 
					</table>
				</form>
			</div>

			<div class="panel-footer" align="right">
				<button id="submit" class="btn btn-primary" type="button">
					<span class="glyphicon glyphicon-ok"></span> 提交
				</button>
				<button id="reset" class="btn btn-primary" type="button">
					<span class="glyphicon glyphicon-refresh"></span> 重置
				</button>
			</div>

		</div>
	</div>
</body>
</html>